@import '../common/variable', '../common/transition', '../common/wave-effect';

.tulp-button {
  position: relative;
  font-size: 14px;
  background-color: #ffffff;
  border: none;
  border-radius: $_border-radius;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  transition: color 0.25s;
  padding: 0 $_button-padding;
  height: $_button-height;
  text-decoration: none;
  line-height: normal;
  --ripple-color: #415fcc;
  &-content {
    height: 1em;
    line-height: 1;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
  }
  &-border {
    transition: transitionEffect(border-color);
    box-sizing: border-box;
    width: 100%;
    border-radius: inherit;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }
}
.tulp-button-small {
  padding: 0 $_button-small-padding;
  height: $_button-small-height;
}

.tulp-button-default {
  .tulp-button-border {
    border: 1px solid #dcdfe6;
  }
  &:hover, &:focus {
    color: $_color-primary;
    .tulp-button-border {
      border-color: $_color-primary;
    }
  }
  &:active {
    color: $_color-primary-dark;
    .tulp-button-border {
      border-color: $_color-primary-dark;
    }
  }
}

.tulp-button-primary {
  color: #ffffff;
  background-color: $_color-primary;
  transition: background-color 0.25s;
  .tulp-button-border {
    border: none;
  }
  &:hover, &:focus {
    background-color: $_color-primary-light;
  }
  &:active {
    background-color: $_color-primary-dark;
  }
}

.tulp-button-wave {
  @include wave-effect;
  &.active {
    animation-name: wave-spread, wave-opacity;
  }
}
